<template>
	<view class="invite">
		<view class="bg-gradual-orange1 radius display-sb1 radiusl" @tap="jump1('/pages/public/poster/index?posterType='+'user')">
			<view class="">
				<view class="">
					<text class="cuIcon-choiceness margin-right"></text> 邀请有礼
				</view>
				<view class="" style="margin-top: 10rpx;">
					邀请小伙伴，躺着就能赚
				</view>
			</view>
			<view class="f12" style="background-color: #CBAC7A;padding: 10rpx 20rpx; border-radius: 10rpx;">
				立即邀请
			</view>
		</view>




		<view class="flex justify-between margin-top">
			<view class="center1">
				<view class="">
					邀请返利 (元)
				</view>
				<view class="" style="margin-top: 10rpx; color: #895835;">
					{{list.history}}
				</view>
				<view class="" style="margin-top: 20rpx;">
					今日收益 <text style="color: #232323;margin-left: 6rpx; font-weight: 600;">{{list.day}}</text>
				</view>
			</view>
			<view class="center1" style="margin-left: 10rpx;">
				<view class="">
					邀请成员 (人)
				</view>
				<view class="" style="margin-top: 10rpx; color: #895835;">
					{{list.count_share}}
				</view>
				<view class="" style="margin-top: 20rpx;">
					今日新增
					 <text style="color: #232323;margin-left: 6rpx; font-weight: 600;">{{list.day_count_share}}</text>
				</view>
			</view>
		</view>



		<view class="margin-top" style="padding: 37rpx 22rpx; background-color: #FFFFFF;border-radius: 20rpx;">
			<text>当前收益</text>
			<block v-for="(item, index) in listFrom" :key="index">
				<view class="flex justify-between align-center" style="margin-top: 20rpx;">
					<view class="info-image flex align-center">
						<view class="images1">
							<image :src="item.avatar" mode=""></image>
						</view>
						<view class="">
							<view class="f12">
								{{item.nickname}}
							</view>
							<view class="f10" style="margin-top: 6rpx; color: #717171;">
								{{item.createtime}}
							</view>
						</view>
					</view>
					<view>
						返利 +{{item.wallet}}
					</view>
				</view>
				<view class=" solid-bottom margin-top">
				</view>
			</block>
		</view>




	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: {},
				listFrom: [],
			}
		},
		onLoad() {
			this.getList()
			this.fromList()
		},
		methods: {
			getList() {
				this.$api('user.yaoqing', {}).then(res => {
					this.list = res.data
				})
			},
			
			
			fromList() {
				this.$api('user.list', {}).then(res => {
					this.listFrom = res.data.data
					console.log(res)
				})
			},
			
			


			jump1(data) {
				this.$tools.routerTo(data);
				console.log(data)
			},
		}
	}
</script>

<style lang="scss" scoped>
	.invite {
		padding: 22rpx;

		image {
			width: 100%;
			height: 100%;
		}

		.radiusl {
			padding: 30rpx;
			border-radius: 20rpx;
		}

		.center1 {
			width: 96%;
			padding: 22rpx 20rpx;
			border-radius: 10rpx;
			background-color: #FFFFFF;
		}

		.info-image {

			.images1 {
				width: 84rpx;
				height: 84rpx;
				margin-right: 20rpx;
			}

		}
	}
</style>
